{extend name="public/base"/}
{block name="content"}
    <div class="box-body">
        <form class="layui-form" action="{:url()}" method="post" id="goods-form">
            <div class="layui-form-item">
                <label class="layui-form-label">标题</label>
                <div class="layui-input-block">
                    <input type="text" name="title" placeholder="" value="{$info.title|default=''}" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">封面图</label>
                <div class="layui-input-block">
                    {:widget('upload/upload',['field'=>'cover','type'=>'image','value'=>(isset($info['cover'])?$info['cover']:'')])}
                    <div class="layui-form-mid layui-word-aux">建议上传大小：200*200</div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">详情</label>
                <div class="layui-input-block">
                    {:widget('upload/editor')}
                </div>
            </div>
            <input type="hidden" name="id" value="{$info.id|default=''}">
            <input type="hidden" name="cate_id" value="{$info.cate_id|default='1'}">
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit lay-filter="layform"><i class="fa fa-save"></i> 保存</button>
                    <button type="reset" class="layui-btn layui-btn-sm layui-btn-primary" style="margin-left: 20px;">重置</button>
                </div>
            </div>
        </form>
    </div>
{/block}